<template>
  <div id="app">
        <router-view v-if="isRouterAlive"/>
        <fooers></fooers>
  </div>
</template>

<script>
  import fooers from "@/components/public/fooer"

  export default {
    components: {
      fooers,
    },
    name: 'App',
    data(){
      return{
        isRouterAlive:true
      }
    },
    provide(){
     return{
       reload:this.reload
     }
    },
    methods:{
      reload(){
        this.isRouterAlive = false;
        this.$nextTick(()=> {
          this.isRouterAlive = true;
        })
      }
    },

    mounted(){
      if(sessionStorage.url=== undefined){
        this.$router.push('/');
      }else {
        var a = JSON.parse(sessionStorage.url);
        this.$router.push(a);
      }
    }
  }
</script>

<style>

</style>
